﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MimiDouban.Abstract.Beans;

namespace MimiDouban.Abstract
{
    /// <summary>
    /// 用于输入信息的界面
    /// </summary>
    public interface IInputUI
    {
        /// <summary>
        /// 喜欢按钮点击事件
        /// </summary>
        event ButtonClickHandler LikeClicked;

        /// <summary>
        /// 不喜欢按钮点击事件
        /// </summary>
        event ButtonClickHandler DisikeClicked;

        /// <summary>
        /// 下一首按钮点击事件
        /// </summary>
        event ButtonClickHandler NextClicked;

        /// <summary>
        /// 暂停按钮点击事件
        /// </summary>
        event ButtonClickHandler PauseClicked;

        /// <summary>
        /// 关闭按钮点击事件
        /// </summary>
        event ButtonClickHandler CloseClicked;

        /// <summary>
        /// 频道切换事件
        /// </summary>
        event ChannelChooseHandler ChannelChoosen;

        /// <summary>
        /// 声音修改事件
        /// </summary>
        event VolumeChangedHandler VolumeChanged;

        /// <summary>
        /// 用户登录事件
        /// </summary>
        event UserLoginHandler UserLogin;

        /// <summary>
        /// 停止UI
        /// </summary>
        void end();
    }

    
    /// <summary>
    /// 按钮事件处理器
    /// </summary>
    public delegate void ButtonClickHandler();

    /// <summary>
    /// 新频道事件处理器
    /// </summary>
    /// <param name="channelId">新频道</param>
    public delegate void ChannelChooseHandler(int channelId);

    /// <summary>
    /// 新音量事件处理器
    /// </summary>
    /// <param name="newVolume">新音量</param>
    public delegate void VolumeChangedHandler(double newVolume);

    /// <summary>
    /// 用户登录事件处理器
    /// </summary>
    /// <param name="email">用户名</param>
    /// <param name="password">密码</param>
    /// <returns>登录成功状态</returns>
    public delegate DoubanUser UserLoginHandler(string email, string password);
}
